3.119 \(\int x^2 (a+b \tanh ^{-1}(c x^3))^2 \, dx\)

Optimal. Leaf size=96 \[ -\frac{b^2 \text{PolyLog}\left (2,1-\frac{2}{1-c x^3}\right )}{3 c}+\frac{1}{3} x^3 \left (a+b \tanh ^{-1}\left (c x^3\right )\right )^2+\frac{\left (a+b \tanh ^{-1}\left (c x^3\right )\right )^2}{3 c}-\frac{2 b \log \left (\frac{2}{1-c x^3}\right ) \left (a+b \tanh ^{-1}\left (c x^3\right )\right )}{3 c} \]

[Out]

(a + b*ArcTanh[c*x^3])^2/(3*c) + (x^3*(a + b*ArcTanh[c*x^3])^2)/3 - (2*b*(a + b*ArcTanh[c*x^3])*Log[2/(1 - c*x
^3)])/(3*c) - (b^2*PolyLog[2, 1 - 2/(1 - c*x^3)])/(3*c)

________________________________________________________________________________________

Rubi [B]  time = 0.591888, antiderivative size = 207, normalized size of antiderivative = 2.16, number of steps used = 28, number of rules used = 12, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.75, Rules used = {6099, 2454, 2389, 2296, 2295, 6715, 2430, 43, 2416, 2394, 2393, 2391} \[ -\frac{b^2 \text{PolyLog}\left (2,\frac{1}{2} \left (1-c x^3\right )\right )}{6 c}+\frac{b^2 \text{PolyLog}\left (2,\frac{1}{2} \left (c x^3+1\right )\right )}{6 c}+\frac{1}{6} b x^3 \log \left (c x^3+1\right ) \left (2 a-b \log \left (1-c x^3\right )\right )-\frac{\left (1-c x^3\right ) \left (2 a-b \log \left (1-c x^3\right )\right )^2}{12 c}+\frac{b \log \left (\frac{1}{2} \left (c x^3+1\right )\right ) \left (2 a-b \log \left (1-c x^3\right )\right )}{6 c}+\frac{b^2 \left (c x^3+1\right ) \log ^2\left (c x^3+1\right )}{12 c}+\frac{b^2 \log \left (\frac{1}{2} \left (1-c x^3\right )\right ) \log \left (c x^3+1\right )}{6 c} \]

Warning: Unable to verify antiderivative.

[In]

Int[x^2*(a + b*ArcTanh[c*x^3])^2,x]

[Out]

-((1 - c*x^3)*(2*a - b*Log[1 - c*x^3])^2)/(12*c) + (b*(2*a - b*Log[1 - c*x^3])*Log[(1 + c*x^3)/2])/(6*c) + (b^
2*Log[(1 - c*x^3)/2]*Log[1 + c*x^3])/(6*c) + (b*x^3*(2*a - b*Log[1 - c*x^3])*Log[1 + c*x^3])/6 + (b^2*(1 + c*x
^3)*Log[1 + c*x^3]^2)/(12*c) - (b^2*PolyLog[2, (1 - c*x^3)/2])/(6*c) + (b^2*PolyLog[2, (1 + c*x^3)/2])/(6*c)

Rule 6099

Int[((a_.) + ArcTanh[(c_.)*(x_)^(n_)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(d*x)^
m*(a + (b*Log[1 + c*x^n])/2 - (b*Log[1 - c*x^n])/2)^p, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && IGtQ[p, 0] &&
 IntegerQ[m] && IntegerQ[n]

Rule 2454

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))^(q_.)*(x_)^(m_.), x_Symbol] :> Dist[1/n, Subst[I
nt[x^(Simplify[(m + 1)/n] - 1)*(a + b*Log[c*(d + e*x)^p])^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, e, m, n, p,
 q}, x] && IntegerQ[Simplify[(m + 1)/n]] && (GtQ[(m + 1)/n, 0] || IGtQ[q, 0]) &&  !(EqQ[q, 1] && ILtQ[n, 0] &&
 IGtQ[m, 0])

Rule 2389

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.), x_Symbol] :> Dist[1/e, Subst[Int[(a + b*Log[c*
x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, n, p}, x]

Rule 2296

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*Log[c*x^n])^p, x] - Dist[b*n*p, In
t[(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{a, b, c, n}, x] && GtQ[p, 0] && IntegerQ[2*p]

Rule 2295

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 6715

Int[(u_)*(x_)^(m_.), x_Symbol] :> Dist[1/(m + 1), Subst[Int[SubstFor[x^(m + 1), u, x], x], x, x^(m + 1)], x] /
; FreeQ[m, x] && NeQ[m, -1] && FunctionOfQ[x^(m + 1), u, x]

Rule 2430

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + Log[(h_.)*((i_.) + (j_.)*(x_))^(m_.)]*
(g_.)), x_Symbol] :> Simp[x*(a + b*Log[c*(d + e*x)^n])^p*(f + g*Log[h*(i + j*x)^m]), x] + (-Dist[g*j*m, Int[(x
*(a + b*Log[c*(d + e*x)^n])^p)/(i + j*x), x], x] - Dist[b*e*n*p, Int[(x*(a + b*Log[c*(d + e*x)^n])^(p - 1)*(f
+ g*Log[h*(i + j*x)^m]))/(d + e*x), x], x]) /; FreeQ[{a, b, c, d, e, f, g, h, i, j, m, n}, x] && IGtQ[p, 0]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2416

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((h_.)*(x_))^(m_.)*((f_) + (g_.)*(x_)^(r_.))^(q
_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*Log[c*(d + e*x)^n])^p, (h*x)^m*(f + g*x^r)^q, x], x] /; FreeQ[{a,
 b, c, d, e, f, g, h, m, n, p, q, r}, x] && IntegerQ[m] && IntegerQ[q]

Rule 2394

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Simp[(Log[(e*(f +
g*x))/(e*f - d*g)]*(a + b*Log[c*(d + e*x)^n]))/g, x] - Dist[(b*e*n)/g, Int[Log[(e*(f + g*x))/(e*f - d*g)]/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n}, x] && NeQ[e*f - d*g, 0]

Rule 2393

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))]*(b_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Dist[1/g, Subst[Int[(a +
 b*Log[1 + (c*e*x)/g])/x, x], x, f + g*x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[e*f - d*g, 0] && EqQ[g
 + c*(e*f - d*g), 0]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rubi steps

\begin{align*} \int x^2 \left (a+b \tanh ^{-1}\left (c x^3\right )\right )^2 \, dx &=\int \left (\frac{1}{4} x^2 \left (2 a-b \log \left (1-c x^3\right )\right )^2-\frac{1}{2} b x^2 \left (-2 a+b \log \left (1-c x^3\right )\right ) \log \left (1+c x^3\right )+\frac{1}{4} b^2 x^2 \log ^2\left (1+c x^3\right )\right ) \, dx\\ &=\frac{1}{4} \int x^2 \left (2 a-b \log \left (1-c x^3\right )\right )^2 \, dx-\frac{1}{2} b \int x^2 \left (-2 a+b \log \left (1-c x^3\right )\right ) \log \left (1+c x^3\right ) \, dx+\frac{1}{4} b^2 \int x^2 \log ^2\left (1+c x^3\right ) \, dx\\ &=\frac{1}{12} \operatorname{Subst}\left (\int (2 a-b \log (1-c x))^2 \, dx,x,x^3\right )-\frac{1}{6} b \operatorname{Subst}\left (\int (-2 a+b \log (1-c x)) \log (1+c x) \, dx,x,x^3\right )+\frac{1}{12} b^2 \operatorname{Subst}\left (\int \log ^2(1+c x) \, dx,x,x^3\right )\\ &=\frac{1}{6} b x^3 \left (2 a-b \log \left (1-c x^3\right )\right ) \log \left (1+c x^3\right )-\frac{\operatorname{Subst}\left (\int (2 a-b \log (x))^2 \, dx,x,1-c x^3\right )}{12 c}+\frac{b^2 \operatorname{Subst}\left (\int \log ^2(x) \, dx,x,1+c x^3\right )}{12 c}+\frac{1}{6} (b c) \operatorname{Subst}\left (\int \frac{x (-2 a+b \log (1-c x))}{1+c x} \, dx,x,x^3\right )-\frac{1}{6} \left (b^2 c\right ) \operatorname{Subst}\left (\int \frac{x \log (1+c x)}{1-c x} \, dx,x,x^3\right )\\ &=-\frac{\left (1-c x^3\right ) \left (2 a-b \log \left (1-c x^3\right )\right )^2}{12 c}+\frac{1}{6} b x^3 \left (2 a-b \log \left (1-c x^3\right )\right ) \log \left (1+c x^3\right )+\frac{b^2 \left (1+c x^3\right ) \log ^2\left (1+c x^3\right )}{12 c}-\frac{b \operatorname{Subst}\left (\int (2 a-b \log (x)) \, dx,x,1-c x^3\right )}{6 c}-\frac{b^2 \operatorname{Subst}\left (\int \log (x) \, dx,x,1+c x^3\right )}{6 c}+\frac{1}{6} (b c) \operatorname{Subst}\left (\int \left (\frac{-2 a+b \log (1-c x)}{c}-\frac{-2 a+b \log (1-c x)}{c (1+c x)}\right ) \, dx,x,x^3\right )-\frac{1}{6} \left (b^2 c\right ) \operatorname{Subst}\left (\int \left (-\frac{\log (1+c x)}{c}-\frac{\log (1+c x)}{c (-1+c x)}\right ) \, dx,x,x^3\right )\\ &=\frac{1}{3} a b x^3+\frac{b^2 x^3}{6}-\frac{\left (1-c x^3\right ) \left (2 a-b \log \left (1-c x^3\right )\right )^2}{12 c}-\frac{b^2 \left (1+c x^3\right ) \log \left (1+c x^3\right )}{6 c}+\frac{1}{6} b x^3 \left (2 a-b \log \left (1-c x^3\right )\right ) \log \left (1+c x^3\right )+\frac{b^2 \left (1+c x^3\right ) \log ^2\left (1+c x^3\right )}{12 c}+\frac{1}{6} b \operatorname{Subst}\left (\int (-2 a+b \log (1-c x)) \, dx,x,x^3\right )-\frac{1}{6} b \operatorname{Subst}\left (\int \frac{-2 a+b \log (1-c x)}{1+c x} \, dx,x,x^3\right )+\frac{1}{6} b^2 \operatorname{Subst}\left (\int \log (1+c x) \, dx,x,x^3\right )+\frac{1}{6} b^2 \operatorname{Subst}\left (\int \frac{\log (1+c x)}{-1+c x} \, dx,x,x^3\right )+\frac{b^2 \operatorname{Subst}\left (\int \log (x) \, dx,x,1-c x^3\right )}{6 c}\\ &=\frac{b^2 x^3}{3}+\frac{b^2 \left (1-c x^3\right ) \log \left (1-c x^3\right )}{6 c}-\frac{\left (1-c x^3\right ) \left (2 a-b \log \left (1-c x^3\right )\right )^2}{12 c}+\frac{b \left (2 a-b \log \left (1-c x^3\right )\right ) \log \left (\frac{1}{2} \left (1+c x^3\right )\right )}{6 c}-\frac{b^2 \left (1+c x^3\right ) \log \left (1+c x^3\right )}{6 c}+\frac{b^2 \log \left (\frac{1}{2} \left (1-c x^3\right )\right ) \log \left (1+c x^3\right )}{6 c}+\frac{1}{6} b x^3 \left (2 a-b \log \left (1-c x^3\right )\right ) \log \left (1+c x^3\right )+\frac{b^2 \left (1+c x^3\right ) \log ^2\left (1+c x^3\right )}{12 c}-\frac{1}{6} b^2 \operatorname{Subst}\left (\int \frac{\log \left (\frac{1}{2} (1-c x)\right )}{1+c x} \, dx,x,x^3\right )+\frac{1}{6} b^2 \operatorname{Subst}\left (\int \log (1-c x) \, dx,x,x^3\right )-\frac{1}{6} b^2 \operatorname{Subst}\left (\int \frac{\log \left (\frac{1}{2} (1+c x)\right )}{1-c x} \, dx,x,x^3\right )+\frac{b^2 \operatorname{Subst}\left (\int \log (x) \, dx,x,1+c x^3\right )}{6 c}\\ &=\frac{b^2 x^3}{6}+\frac{b^2 \left (1-c x^3\right ) \log \left (1-c x^3\right )}{6 c}-\frac{\left (1-c x^3\right ) \left (2 a-b \log \left (1-c x^3\right )\right )^2}{12 c}+\frac{b \left (2 a-b \log \left (1-c x^3\right )\right ) \log \left (\frac{1}{2} \left (1+c x^3\right )\right )}{6 c}+\frac{b^2 \log \left (\frac{1}{2} \left (1-c x^3\right )\right ) \log \left (1+c x^3\right )}{6 c}+\frac{1}{6} b x^3 \left (2 a-b \log \left (1-c x^3\right )\right ) \log \left (1+c x^3\right )+\frac{b^2 \left (1+c x^3\right ) \log ^2\left (1+c x^3\right )}{12 c}+\frac{b^2 \operatorname{Subst}\left (\int \frac{\log \left (1-\frac{x}{2}\right )}{x} \, dx,x,1-c x^3\right )}{6 c}-\frac{b^2 \operatorname{Subst}\left (\int \frac{\log \left (1-\frac{x}{2}\right )}{x} \, dx,x,1+c x^3\right )}{6 c}-\frac{b^2 \operatorname{Subst}\left (\int \log (x) \, dx,x,1-c x^3\right )}{6 c}\\ &=-\frac{\left (1-c x^3\right ) \left (2 a-b \log \left (1-c x^3\right )\right )^2}{12 c}+\frac{b \left (2 a-b \log \left (1-c x^3\right )\right ) \log \left (\frac{1}{2} \left (1+c x^3\right )\right )}{6 c}+\frac{b^2 \log \left (\frac{1}{2} \left (1-c x^3\right )\right ) \log \left (1+c x^3\right )}{6 c}+\frac{1}{6} b x^3 \left (2 a-b \log \left (1-c x^3\right )\right ) \log \left (1+c x^3\right )+\frac{b^2 \left (1+c x^3\right ) \log ^2\left (1+c x^3\right )}{12 c}-\frac{b^2 \text{Li}_2\left (\frac{1}{2} \left (1-c x^3\right )\right )}{6 c}+\frac{b^2 \text{Li}_2\left (\frac{1}{2} \left (1+c x^3\right )\right )}{6 c}\\ \end{align*}

Mathematica [A]  time = 0.152375, size = 99, normalized size = 1.03 \[ \frac{b^2 \text{PolyLog}\left (2,-e^{-2 \tanh ^{-1}\left (c x^3\right )}\right )+a \left (a c x^3+b \log \left (1-c^2 x^6\right )\right )+2 b \tanh ^{-1}\left (c x^3\right ) \left (a c x^3-b \log \left (e^{-2 \tanh ^{-1}\left (c x^3\right )}+1\right )\right )+b^2 \left (c x^3-1\right ) \tanh ^{-1}\left (c x^3\right )^2}{3 c} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[x^2*(a + b*ArcTanh[c*x^3])^2,x]

[Out]

(b^2*(-1 + c*x^3)*ArcTanh[c*x^3]^2 + 2*b*ArcTanh[c*x^3]*(a*c*x^3 - b*Log[1 + E^(-2*ArcTanh[c*x^3])]) + a*(a*c*
x^3 + b*Log[1 - c^2*x^6]) + b^2*PolyLog[2, -E^(-2*ArcTanh[c*x^3])])/(3*c)

________________________________________________________________________________________

Maple [A]  time = 0.004, size = 145, normalized size = 1.5 \begin{align*}{\frac{ \left ({\it Artanh} \left ( c{x}^{3} \right ) \right ) ^{2}{x}^{3}{b}^{2}}{3}}+{\frac{2\,ab{x}^{3}{\it Artanh} \left ( c{x}^{3} \right ) }{3}}+{\frac{{x}^{3}{a}^{2}}{3}}-{\frac{2\,{\it Artanh} \left ( c{x}^{3} \right ){b}^{2}}{3\,c}\ln \left ({\frac{ \left ( c{x}^{3}+1 \right ) ^{2}}{-{c}^{2}{x}^{6}+1}}+1 \right ) }+{\frac{{b}^{2} \left ({\it Artanh} \left ( c{x}^{3} \right ) \right ) ^{2}}{3\,c}}+{\frac{ab\ln \left ( -{c}^{2}{x}^{6}+1 \right ) }{3\,c}}-{\frac{{b}^{2}}{3\,c}{\it polylog} \left ( 2,-{\frac{ \left ( c{x}^{3}+1 \right ) ^{2}}{-{c}^{2}{x}^{6}+1}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(a+b*arctanh(c*x^3))^2,x)

[Out]

1/3*arctanh(c*x^3)^2*x^3*b^2+2/3*a*b*x^3*arctanh(c*x^3)+1/3*x^3*a^2-2/3/c*arctanh(c*x^3)*ln((c*x^3+1)^2/(-c^2*
x^6+1)+1)*b^2+1/3/c*b^2*arctanh(c*x^3)^2+1/3/c*a*b*ln(-c^2*x^6+1)-1/3/c*polylog(2,-(c*x^3+1)^2/(-c^2*x^6+1))*b
^2

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \frac{1}{3} \, a^{2} x^{3} + \frac{1}{12} \,{\left (x^{3} \log \left (-c x^{3} + 1\right )^{2} - c^{2}{\left (\frac{2 \, x^{3}}{c^{2}} - \frac{\log \left (c x^{3} + 1\right )}{c^{3}} + \frac{\log \left (c x^{3} - 1\right )}{c^{3}}\right )} - 2 \,{\left (\frac{x^{3}}{c} + \frac{\log \left (c x^{3} - 1\right )}{c^{2}}\right )} c \log \left (-c x^{3} + 1\right ) + 18 \, c \int \frac{x^{5} \log \left (c x^{3} + 1\right )}{c^{2} x^{6} - 1}\,{d x} + \frac{c x^{3} \log \left (c x^{3} + 1\right )^{2} + 2 \,{\left (c x^{3} -{\left (c x^{3} + 1\right )} \log \left (c x^{3} + 1\right )\right )} \log \left (-c x^{3} + 1\right )}{c} + \frac{2 \, c x^{3} + \log \left (c x^{3} - 1\right )^{2} + 2 \, \log \left (c x^{3} - 1\right )}{c} - \frac{\log \left (c^{2} x^{6} - 1\right )}{c} + 6 \, \int \frac{x^{2} \log \left (c x^{3} + 1\right )}{c^{2} x^{6} - 1}\,{d x}\right )} b^{2} + \frac{{\left (2 \, c x^{3} \operatorname{artanh}\left (c x^{3}\right ) + \log \left (-c^{2} x^{6} + 1\right )\right )} a b}{3 \, c} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*arctanh(c*x^3))^2,x, algorithm="maxima")

[Out]

1/3*a^2*x^3 + 1/12*(x^3*log(-c*x^3 + 1)^2 - c^2*(2*x^3/c^2 - log(c*x^3 + 1)/c^3 + log(c*x^3 - 1)/c^3) - 2*(x^3
/c + log(c*x^3 - 1)/c^2)*c*log(-c*x^3 + 1) + 18*c*integrate(x^5*log(c*x^3 + 1)/(c^2*x^6 - 1), x) + (c*x^3*log(
c*x^3 + 1)^2 + 2*(c*x^3 - (c*x^3 + 1)*log(c*x^3 + 1))*log(-c*x^3 + 1))/c + (2*c*x^3 + log(c*x^3 - 1)^2 + 2*log
(c*x^3 - 1))/c - log(c^2*x^6 - 1)/c + 6*integrate(x^2*log(c*x^3 + 1)/(c^2*x^6 - 1), x))*b^2 + 1/3*(2*c*x^3*arc
tanh(c*x^3) + log(-c^2*x^6 + 1))*a*b/c

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (b^{2} x^{2} \operatorname{artanh}\left (c x^{3}\right )^{2} + 2 \, a b x^{2} \operatorname{artanh}\left (c x^{3}\right ) + a^{2} x^{2}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*arctanh(c*x^3))^2,x, algorithm="fricas")

[Out]

integral(b^2*x^2*arctanh(c*x^3)^2 + 2*a*b*x^2*arctanh(c*x^3) + a^2*x^2, x)

________________________________________________________________________________________

Sympy [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: KeyError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*(a+b*atanh(c*x**3))**2,x)

[Out]

Exception raised: KeyError

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \operatorname{artanh}\left (c x^{3}\right ) + a\right )}^{2} x^{2}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*arctanh(c*x^3))^2,x, algorithm="giac")

[Out]

integrate((b*arctanh(c*x^3) + a)^2*x^2, x)